package service

import (
	"github.com/go-kratos/kratos/v2/log"
	"github.com/google/wire"
	v1 "kratos-realworld/api/realworld/v1"
	"kratos-realworld/internal/biz"
)

// ProviderSet is service providers.
var ProviderSet = wire.NewSet(NewRealWorldService)

// 一个微服务一般只有一个 service
type RealWorldService struct {
	v1.UnimplementedRealWorldServer
	socialUC *biz.SocialUseCase
	userUC   *biz.UserUseCase
	log      *log.Helper
}

func NewRealWorldService(socialUC *biz.SocialUseCase, userUC *biz.UserUseCase, logger log.Logger) *RealWorldService {
	return &RealWorldService{socialUC: socialUC, userUC: userUC, log: log.NewHelper(logger)}
}
